package gpsBD;

import java.util.ArrayList;

/**
 * @author  Jennifer Henry
 */

public class Route {
	int id; // TODO Id route ?
	String nom;
	ArrayList<Troncon> troncons;
	public Route(String n) {
		id = 0;
		nom = n;
		troncons = new ArrayList<Troncon>();
	}
	public int getId() {
		return id;
	}
	public void setId(int _id) {
		id = _id;
	}
	public String getNom() {
		return nom;
	}
	public void setNom(String _nom) {
		nom = _nom;
	}
	public ArrayList<Troncon> getTroncons() {
		return troncons;
	}
	public void addTroncon (Troncon t) {
		if (!troncons.contains(t)) {
			troncons.add(t);
		}
	}
	public boolean removeTroncon (Troncon t) {
		return troncons.remove(t);
	}
}